import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询用户列表
export function listAccident(query) {
  return request({
    url: '/aqsc/accidentCategory/list',
    method: 'get',
    params: query
  })
}

//查询所属机构列表

export function getDeptList(){
    return request({
      url: '/system/user/deptTree',
      method: 'get',
    })
}
// 查询用户详细
export function getAccident(id) {
  return request({
    url: '/aqsc/accidentCategory/' + parseStrEmpty(id),
    method: 'get'
  })
}

// 新增用户
export function addAccident(data) {
  return request({
    url: '/aqsc/accidentCategory',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateAccident(data) {
  return request({
    url: '/aqsc/accidentCategory',
    method: 'put',
    data: data
  })
}

// 删除用户
export function delAccident(ids) {
  return request({
    url: '/aqsc/accidentCategory/' + ids,
    method: 'delete'
  })
}
